import { Component, Vue, Prop, Emit, Mixins, Watch, Inject, Provide, Ref } from 'vue-property-decorator';
import { ImagePreview } from 'vant';
@Component({
  components: {
    ImagePreview: ImagePreview.Component
  }
})
export default class App extends Vue {
  imagePreviewShow = false;
  imagePreview = {
    images: [],
    startPosition: 0,
    closeOnPopstate: true
  };

  beforeRouteLeave(to, from, next) {
    if (this.imagePreviewShow) {
      next(false);
    }
    else {
      next();
    }
  }
}
